<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../include/base.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  	 <link rel="stylesheet" type="text/css" href="${ basePath}/statics/css/bootstrap.min.css" />
    <title>显示所有奖罚人员</title>
</head>
<body>
	<div class="container" style="margin-top:20px; background-color:#fff;">
		<div class="row">
			<div class="span12"  >				
				<ul style="margin-top:10px ; margin-bottom:0px;  height:40px;" class="breadcrumb">
					<li class="active" style="font-size:20px;margin-top:10px;margin-left:10px;">
						<form class="form-search">
						<span style="font-size:16px; margin-right:15px;">姓名:</span><input type="text" class="input-medium search-query">
						<span style="font-size:16px; margin-right:15px;">奖罚类别:</span><input type="text" class="input-medium search-query">
						<button type="submit" class="btn">Search</button>
						
					</form>
					</li>
					<li style="float:right;margin-top:10px;" ><a href="${basePath}/rewards/add.action" style="font-size:20px;" class="btn ">添加</a></li>
				</ul>								
				<hr/>
				<table  border="1px;" width="100%" class="table">
					<tr>
						<td>奖罚日期</td>
						<td>姓名</td>
						<td>奖罚类别</td>
						<td>奖罚内容</td>
						<td>奖罚原因</td>							
						<td>批准人</td>
						<td>备注</td>
						<td colspan="2">相关操作</td>
					</tr>
					<c:if test="${fn:length(rewardlist) == 0 }">
						<tr>
							<td colspan="9">最近没有奖罚人员</td>
						</tr>
					</c:if>
					<c:forEach items="${rewardlist }" var="r">
					<tr>
						<td>${r.dates}</td>
						<td>${r.worker.names}</td>
						<td>${r.category}</td>
						<td>${r.content}</td>
						<td>${r.reason}</td>
						<td>${r.approver}</td>
						<td>${r.beizhu}</td>
						<td colspan="2"><a href="${basePath }/rewards/edit.action">编辑</a>&nbsp;&nbsp;&nbsp;<a href="javascript:;" rel="${r.id}" class="del_link">删除</a></td>
					</tr>
					</c:forEach>
				</table>				
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".del_link").click(function(){
				var id = $(this).attr("rel");
    			if(confirm("确定要删除此数据？")) {
    				window.location.href = "del.action?id=" + id;
    			}
			});
		});
	</script>
</body>
</html>
